netsuite-js

SearchRowBasic

declaration
SearchRowBasic ->SearchRowBasic

var SearchRowBasic = module.exports = function SearchRowBasic() {
  BaseObject.call(this);

searchColumnFields

property
this.searchColumnFields

@member {SearchColumnField[]} The search column fields to return this search. Required.

this.searchColumnFields = [];
};

util.inherits(SearchRowBasic, BaseObject);

getSOAPType

method
SearchRowBasic.prototype.getSOAPType()

@override

SearchRowBasic.prototype.getSOAPType = function() {
  // Always searchRow
  return 'searchRowBasic';
};

getUnserializablePropertyNames

method
SearchRowBasic.prototype.getUnserializablePropertyNames()

Do not auto serialize searchColumnFields. @see geXml

SearchRowBasic.prototype.getUnserializablePropertyNames = function() {
  return ['searchColumnFields'];
};

getXml

method
SearchRowBasic.prototype.getXml()

node-soap doesn't set the child namespace correctly so must override all XML.

SearchRowBasic.prototype.getXml = function() {
  var xml = [];
  this.searchColumnFields.forEach(function(searchField) {
    // TODO: add back searchValue and customLabel
    xml.push('<platformCommon:' + searchField.field + '></platformCommon:' + searchField.field + '>');
  });

  return xml.join('');
};